-
Notifications
You must be signed in to change notification settings - Fork 129
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix testsuite #504
Merged
FrostyX
merged 13 commits into
rpm-software-management:main
from
praiskup:praiskup-fix-testsuite
Nov 6, 2024
Merged
fix testsuite #504
FrostyX
merged 13 commits into
rpm-software-management:main
from
praiskup:praiskup-fix-testsuite
Nov 6, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
praiskup
force-pushed
the
praiskup-fix-testsuite
branch
4 times, most recently
from
October 3, 2024 06:53
e310fd0
to
82be0fb
Compare
praiskup
force-pushed
the
praiskup-fix-testsuite
branch
6 times, most recently
from
October 3, 2024 20:43
c04a598
to
da31812
Compare
praiskup
force-pushed
the
praiskup-fix-testsuite
branch
3 times, most recently
from
October 4, 2024 08:23
931ddb1
to
a1dc9a4
Compare
At least temporarily, if anyone wants to make it working in the future (I am not motivated enough as we use vcs-diff-lint/python for similar things).
Mostly wrong import order, useless imports, etc.
- Requires us to add pytest.ini to tell pytest where to look for test files, and set the python path. - Mock drops terminal from the tested code, so we have to "mock" it in test_colors() - Enable coverage in tox tests.
praiskup
force-pushed
the
praiskup-fix-testsuite
branch
from
October 4, 2024 08:47
c38c678
to
0754c52
Compare
- Some tests can not work at rpmbuild time, because we can not run rpmbuild in rpmbuild, and there's no .git/ directory, skip. - Use 'titodir' below 'srcdir', to not pollute the /tmp/tito dir. - The test_colors() test requires color-friendly TERM env. - EL7 is EOL, do not enable tests there.
The Version is more strict, but we only use this for the implementation of tito.props configuration: [requirements] tito = <version> And the tito versions are not anyhow extraordinary. Note, this is done to fix a tox test failure.
Even Python 2.7 is now EOL. And this weird import has been breaking the Tox tests (importing the tagger class brought in other unnecessary deps and tests bombed).
This is tricky. Note the sys.path hack in test/unit/__init__.py where we intentionally use the Fedora's default Python libraries with a different Python version selected by Tox. Right now it means that we use, e.g., python3-rpm compiled for Python 3.12 (F39) with Python 3.7 (which probably works because Tox is executed as root in the tox container, overwriting the pre-compiled *.pyc files in container). Some tests need to be skipped in Tox, therefore the skip_if_tox() method. Also, the GitHub's action for 'git checkout' provides somewhat non-standard environment for Tito to work, hence the fix_tox_env() configuration method.
praiskup
force-pushed
the
praiskup-fix-testsuite
branch
from
October 4, 2024 13:56
5eb436e
to
b2b5657
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.